<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="<%=request.getContextPath()%>/js/easyui/jquery.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/easyui/locale/easyui-lang-zh_CN.js"></script>
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath()%>/js/easyui/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/js/easyui/themes/icon.css" />
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/js/easyui/themes/admin.css" />
<%-- <link rel="stylesheet" href="<%=request.getContextPath()%>/js/css/bootstrap.min.css"> --%>
<%-- <link rel="stylesheet"
	href="<%=request.getContextPath()%>/js/css/bootstrap.min.css"> --%>

<title>权限管理页面</title>


</head>

<body class="easyui-layout">
  <div data-options="region:'north',title:'header',split:true,noheader:true" style="height:60px;background:#666;">
	<div class="logo">后台管理</div>
	<div class="logout">您好，${user.username } | <a href="../loginout"">退出</a></div>
</div>   
<div data-options="region:'south',title:'footer',split:true,noheader:true" style="height:35px;line-height:30px;text-align:center;">
	&copy;2009-2015 LX_test. Powered by java and EasyUI.
</div>    
<div data-options="region:'west',title:'导航',split:true,iconCls:'icon-world'" style="width:180px;padding:10px;">
	<ul id="nav" class="easyui-tree"></ul>
</div>   
<div data-options="region:'center'" style="overflow:hidden;">
	<div id="tabs">
		<div title="起始页" iconCls="icon-house" style="padding:0 10px;display:block;">
			欢迎来到后台管理系统！
		</div>
	</div>
</div> 
   
</body>


 <script type="text/javascript">
 
$(function () {
	
	/* var data = [{"id":'1' ,"text" :"管理首页" ,"state" :"closed" ,"iconCls" : "" ,"url" :"" ,"nid":'0'},
	            {"id":'2' ,"text" :"权限管理" ,"state" :"open" ,"iconCls" : "" ,"url" :"" ,"nid":'0'}, 
	            {"id":'3' ,"text" :"权限管理" ,"state" :"open" ,"iconCls" : "" ,"url" :"./user/manager_2" ,"nid":'2'},
	            {"id":'4' ,"text" :"地址管理" ,"state" :"open" ,"iconCls" : "" ,"url" :"./user/manager_2" ,"nid":'2'}
	           ] ; */
	
	$('#nav').tree({
		url : 'tree',
		lines : true,
		onLoadSuccess : function (node, data) {
			if (data) {
				$(data).each(function (index, value) {
					if (this.state == 'closed') {
						$('#nav').tree('expandAll');
					}
				});
			}
		},  
		onClick : function (node) {
			if (node.url) {
				if ($('#tabs').tabs('exists', node.text)) {
					$('#tabs').tabs('select', node.text);
				} else {
					$('#tabs').tabs('add', {
						title : node.text,
						iconCls : node.iconCls,
						closable : true,
						href : node.url,
					});
				}
			}
		}
	});
	
	$('#tabs').tabs({
		fit : true,
		border : false,
	});
	
});

    
    </script>
</html>
